{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The restaurant's names (name and aka) section.
  
  Created on 2008-11-07.
  $Id: resto_names.html 269 2008-11-07 18:04:32Z heavyzheng $
-->
{% endcomment %}

<div id="resto_names" class="section">

  {% if error %}
    <div class="error message">
      {{ error }}
      <a href="javascript:void(0);" onclick="closeMessage('#resto_names')">[close]</a>
    </div>
  {% endif %}

  <div class="form-toggle">
    <span class="names">
      <a href="/fnr/resto/{{ resto.uid }}/">{{ resto.full_name }}</a>
    </span>
    {% if editable %}
      {% if resto.is_current_user_editor or is_admin %}
        <a href="javascript:void(0);" onclick="showEditForm('#resto_names');">[edit]</a>
      {% endif %}
    {% endif %}
  </div><!--/.form-toggle-->
  
  {% if editable %}
    {% if resto.is_current_user_editor or is_admin %}

      <form class="edit-form hidden" action="." method="POST">
        <input type="hidden" name="section" value="resto_names"/>
        <input type="text" size="8" name="name" value="{{ resto.name }}"/>
        ( <input type="text" size="12" name="aka" value="{{ resto.aka|default:"" }}"/> )
        <input type="button" value="Update" onclick="submitEditForm('#resto_names');"/>
        <input type="button" value="Cancel" onclick="hideEditForm('#resto_names');"/>
      </form><!--/.edit-form-->
      
      <div class="submitting hidden">
        <img src="/static/fnr/images/waiting.gif" alt="Submitting"/>
        Submitting your request... Please wait...
      </div><!--/.submitting-->
    
    {% endif %}
  {% endif %}

</div><!--/#resto_names-->



